home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CADSP 1.0 / Messenger Classes / CNBP.h < prev   
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.0 KB  |  61 lines  |  [TEXT/KAHL]

  1. /***
  2.  * CNBP
  3.  *
  4.  *        Name Binding Protocol handler
  5.  *
  6.  *        ask this object to handle names over appletalk
  7.  *
  8.  *        Copyright © 1992 Bernard Bernstein. All rights reserved.
  9.  ***/ 
  10.  
  11. #pragma once
  12.  
  13. #include <CObject.h>
  14. #include <Appletalk.h>
  15.  
  16. class CArray;
  17.  
  18. class CNBP : CObject {
  19.  
  20. public:
  21.     void    INBP(void);
  22.     void    Dispose(void);
  23.     void    SetName(Str32 objName, Str32 typeName, Str32 zoneName);
  24.     void    SetSocket(short socket);
  25.     void    MatchNames(Str32 objMatch, Str32 typeMatch, Str32 zoneMatch, 
  26.                         CArray *matches);
  27.     
  28.     void    Register(void);
  29.     void    Lookup(Str32 objMatch, Str32 typeMatch, Str32 zoneMatch,
  30.                     void *buffer, short size, short maxToGet);
  31.     void    Remove(void);
  32.  
  33.  
  34.     Boolean    SetSelfSend(Boolean selfsend);
  35. protected:
  36.  
  37.  
  38. private:
  39.     MPPPBPtr        itsMppPb;
  40.     Boolean            nameOnTable;
  41.     
  42.     Str32            itsObjName;
  43.     Str32            itsTypeName;
  44.     Str32            itsZoneName;
  45.     Boolean            itsNamesSet;
  46.     
  47.     short            itsSocket;
  48.     Boolean            itsSocketSet;
  49.     
  50.     NamesTableEntry    *nte;            // owned by NBP
  51.  
  52. };
  53.  
  54.  
  55. typedef struct nbpname {
  56.     Str32 name;
  57.     Str32 type;
  58.     Str32 zone;
  59.     AddrBlock addr;
  60. } NBPAddrNameRec;
  61.